// 按需导入模块
import Vue from 'vue';
import VueRouter from 'vue-router'

// 注册路由组件,可以用到<router-view></router-view>和<router-view></router-view>>
Vue.use(VueRouter)


// 3创建路由实例 映射路径和组件
import Login from '../views/Login'
const routes = [
    // 
    { path: '/', component: Login },
    { path: '/login', component: Login }
]

const router = new VueRouter({
    routes: routes,
    mode: 'history'
})
export default router
